NumericFunctions.Extract expression

Returns a date/time field from a datetime or interval

Format

ANSI-SQL Format:

EXTRACT ( { YEAR | MONTH | DAY | HOUR | MINUTE | SECOND } FROM expression )

ODBC Format:

{{ FN EXTRACT ( { YEAR | MONTH | DAY | HOUR | MINUTE | SECOND } FROM expression ) }}

Remarks

EXTRACT is used to extract a specific date/time field from a datetime or interval.

The return value is a numeric value reflecting the value of the field extracted.

Example:

EXTRACT( YEAR FROM CurrentTime )

EXTRACT( YEAR FROM TIMESTAMP \'2001-11-12 10:23:35\' )

EXTRACT( YEAR FROM INTERVAL \'1\' YEAR )


Disclaimer

Geo SCADA Expert 2019